﻿function GoToPage(indexs, wsize) {
    if (wsize == null || wsize == "") {
        wsize = "";
    }
    else {
        wsize = "590,220,470,185,541,212";
    }
    var cookies = $.cookie("NewdayPage");
    if (cookies != null) {
        if (cookies > indexs) {
            //window.location.href = "ep_newday" + cookies + ".htm";
            window.open("ep_newday" + cookies + ".htm", "_top");
        }
        else {
            $.cookie("DpMinWebWndSize", wsize);
            GoToNewPage(indexs);
        }
    }
    else {
        $.cookie("DpMinWebWndSize", wsize);
        GoToNewPage(indexs);
    }
}

//下一页面cookie
function GoToNewPage(newcount) {
    newcount = newcount + 1;
    if (newcount < 30) {
        $.cookie("NewdayPage", newcount);
    }
    else {
        $.cookie("NewdayPage", 0);
    }
}

function QueryString() {
    var name, value, i;
    var str = location.href;
    var num = str.indexOf("?")
    str = str.substr(num + 1);
    var arrtmp = str.split("&");
    for (i = 0; i < arrtmp.length; i++) {
        num = arrtmp[i].indexOf("=");
        if (num > 0) {
            name = arrtmp[i].substring(0, num);
            value = arrtmp[i].substr(num + 1);
            this[name] = value;
        }
    }
}

$(document).ready(function () {
    $(".up").mouseover(function () {
        $(this).addClass("uphover");
    });
    $(".up").mouseout(function () {
        $(this).removeClass("uphover");
    });

    $(".down").mouseover(function () {
        $(this).addClass("downhover");
    });
    $(".down").mouseout(function () {
        $(this).removeClass("downhover");
    });
});

function ChangeDiv(indexs) {
    $.cookie("NewdayPage", indexs);
    if (indexs != 0) {
        //window.location.href = "ep_newday" + indexs + ".htm";
        window.open("ep_newday" + indexs + ".htm", "_top");
    }
    else {
        //window.location.href = "ep_newday.htm";
        window.open("ep_newday.htm", "_top");
    }
}